package com.repair.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.repair.entity.RepairOrder;
import java.util.List;
import java.util.Map;

public interface RepairOrderService extends IService<RepairOrder> {
    void createOrder(RepairOrder order);
    void acceptOrder(Long orderId, Long repairmanId);
    void updateOrderStatus(Long orderId, Integer status);
    List<RepairOrder> getUserOrders(Long userId);
    List<RepairOrder> getRepairmanOrders(Long repairmanId);
    List<RepairOrder> getNearbyOrders(Double latitude, Double longitude, Double radius);
    void updateRepairmanLocation(Long repairmanId, Double latitude, Double longitude);
    
    // 扩展方法
    long countTodayOrders();
    long countPendingOrders();
    List<RepairOrder> getRecentOrders();
    List<RepairOrder> getOrdersByStatus(Integer status);
    void cancelOrder(Long orderId);
    
    // 统计方法
    List<Map<String, Object>> getOrderStatistics();
    List<Map<String, Object>> getRepairmanStatistics();

    Map<String, Object> getDashboardData();
    List<Map<String, Object>> getOrderList();
    Map<String, Object> getOrderDetails(Long id);
    Map<String, Object> getStatistics();

    void completeOrder(Long orderId);
    List<Map<String, Object>> getPendingOrders();
    List<Map<String, Object>> getCompletedOrders(Long repairmanId);
    List<Map<String, Object>> getAllOrders();
    void startRepair(Long orderId);

    List<Map<String, Object>> getAcceptedOrders(Long id);

    List<Map<String, Object>> getRepairingOrders(Long id);

    List<Map<String, Object>> getCancelledOrders(Long id);
}